﻿/// ****************************************************************************
/// Author:	        Robin Zhu
/// Create Date:	2012-4-13
/// Purpose: 		用户账号表
/// ****************************************************************************
/// Modify By		Date			Remark
/// ****************************************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RB.Domain.Models;
using System.Runtime.Serialization;

namespace RB.Web.Security
{
    /// <summary>
    /// ToDo: Write comment of the class here
    /// </summary>
    [DataContract]
    [RB.DataAccess.Attributes.QueryName("UserAccount")]
    [RB.DataAccess.Attributes.TableName("UserAccount")]
    public class UserAccount : IIdKeyed<Guid>, ICreateLog, IModifyLog
    {
        [DataMember]
        public System.Guid Id { get; set; }

        [DataMember]
        [System.ComponentModel.DataAnnotations.StringLengthAttribute(50)]
        public string UserName { get; set; }

        [DataMember]
        [System.ComponentModel.DataAnnotations.StringLengthAttribute(50)]
        public string Email { get; set; }

        [DataMember]
        [System.ComponentModel.DataAnnotations.StringLengthAttribute(30)]
        public string Password { get; set; }

        [DataMember]
        [System.ComponentModel.DataAnnotations.StringLengthAttribute(255)]
        public string Comment { get; set; }

        [DataMember]
        public bool IsApproved { get; set; }

        [DataMember]
        [System.ComponentModel.DataAnnotations.StringLengthAttribute(50)]
        public string ApproveBy { get; set; }

        [DataMember]
        public DateTime? ApproveTime { get; set; }

        [DataMember]
        public DateTime? LastLoginDate { get; set; }

        [DataMember]
        public DateTime? LastActivityDate { get; set; }

        [DataMember]
        public DateTime? LastLockoutDate { get; set; }

        [DataMember]
        [System.ComponentModel.DataAnnotations.StringLengthAttribute(50)]
        public string CreateBy { get; set; }

        [DataMember]
        public DateTime? CreateTime { get; set; }

        [DataMember]
        [System.ComponentModel.DataAnnotations.StringLengthAttribute(50)]
        public string ModifyBy { get; set; }

        [DataMember]
        public DateTime? ModifyTime { get; set; }

        [DataMember]
        public bool IsDisabled { get; set; }

        [DataMember]
        public bool IsBuiltin { get; set; }

        [DataMember]
        [System.ComponentModel.DataAnnotations.StringLengthAttribute(50)]
        public string FirstName { get; set; }

        [DataMember]
        [System.ComponentModel.DataAnnotations.StringLengthAttribute(50)]
        public string LastName { get; set; }

        [DataMember]
        [System.ComponentModel.DataAnnotations.StringLengthAttribute(255)]
        public string PasswordQuestion { get; set; }

        [DataMember]
        [System.ComponentModel.DataAnnotations.StringLengthAttribute(255)]
        public string PasswordAnswer { get; set; }

        [DataMember]
        public bool IsLockedOut { get; set; }

        [DataMember]
        public DateTime? LastPasswordChangedDate { get; set; }

        [DataMember]
        public int? PasswordAttemps { get; set; }

        [DataMember]
        public DateTime? PasswordAttempStart { get; set; }

        [DataMember]
        public int? PasswordAnswerAttemps { get; set; }

        [DataMember]
        public DateTime? PasswordAnswerAttempStart { get; set; }

        [DataMember]
        public bool IsStaff { get; set; }

    }


}
